module.exports = {
  publicPath: "/wechatWeb",
  lintOnSave: false,
  productionSourceMap: false,
  devServer: {
    port: 80,
    disableHostCheck: true,
    allowedHosts: [
      process.env.VUE_APP_ALLOWED_HOST
    ],
    proxy: {
      '/': {
        target: process.env.VUE_APP_BASE_URL,
        changeOrigin: false
      }
    },
    overlay: {
      warning: false,
      errors: false
    }
  },
  css: {
    loaderOptions: {
      postcss: {
        plugins: [
          require('postcss-px-to-viewport')({
            unitToConvert: 'px',
            viewportWidth: 375,
            viewportHeight: 668,
            unitPrecision: 3,
            propList: ['*'],
            viewportUnit: 'vw',
            fontViewportUnit: 'vw',
            selectorBlackList: [],
            minPixelValue: 1,
            mediaQuery: false,
            replace: true,
            exclude: /(\/|\\)(node_modules)(\/|\\)/
          })
        ]
      }
    }
  }
}
